home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / il / ilMpRequest.z / ilMpRequest
Encoding:
Text File  |  2002-10-03  |  9.0 KB  |  199 lines

  1.  
  2.  
  3.  
  4. iiiillllMMMMppppRRRReeeeqqqquuuueeeesssstttt((((3333))))     IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll     iiiillllMMMMppppRRRReeeeqqqquuuueeeesssstttt((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      iiiillllMMMMppppRRRReeeeqqqquuuueeeesssstttt - a concurrently executed request
  10.  
  11. IIIINNNNHHHHEEEERRRRIIIITTTTSSSS FFFFRRRROOOOMMMM
  12.      ilMpNode
  13.  
  14. HHHHEEEEAAAADDDDEEEERRRR FFFFIIIILLLLEEEE
  15.      #include <il/ilMpManager.h>
  16.  
  17. CCCCLLLLAAAASSSSSSSS DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  18.      ilMpRequest is derived from ilMpNode and represents an individual unit of
  19.      processing for a parallel operation managed by ilMpManager (also derived
  20.      from ilMpNode).
  21.  
  22. CCCCLLLLAAAASSSSSSSS MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN SSSSUUUUMMMMMMMMAAAARRRRYYYY
  23.      CCCCoooonnnnssssttttrrrruuuuccccttttoooorrrr
  24.  
  25.           ilMpRequest(ilMpManager* parent,        _p_r_o_t_e_c_t_e_d
  26.                       ilMpState initialState=ilMpPrep)
  27.           ilMpRequest(ilMpRequest* sibling)       _p_r_o_t_e_c_t_e_d
  28.           ilMpRequest(ilMpState initialState=ilMpPrep) _p_r_o_t_e_c_t_e_d
  29.  
  30.      SSSSyyyynnnnccccrrrroooonnnniiiizzzzaaaattttiiiioooonnnn mmmmeeeetttthhhhooooddddssss
  31.  
  32.           void park(ilMpRequest* reqToPark)
  33.           void unpark()  _p_r_o_t_e_c_t_e_d
  34.  
  35.      GGGGeeeetttt////sssseeeetttt mmmmeeeetttthhhhooooddddssss
  36.  
  37.           ilMpManager* getParent()
  38.           int hasSiblings()   _p_r_o_t_e_c_t_e_d
  39.           void setNextState(ilMpState next)
  40.           ilMpState getNextState()
  41.  
  42.      DDDDeeeeffffeeeerrrrrrrreeeedddd eeeennnnqqqquuuueeeeuuuueeeeiiiinnnngggg
  43.  
  44.           void enqueue(ilMpState initialState=ilMpPrep)     _p_r_o_t_e_c_t_e_d
  45.  
  46.      RRRReeeeqqqquuuueeeesssstttt pppprrrroooocccceeeessssssssiiiinnnngggg
  47.  
  48.           virtual ilStatus process()    _p_r_o_t_e_c_t_e_d
  49.  
  50.  
  51. FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNSSSS
  52.      iiiillllMMMMppppRRRReeeeqqqquuuueeeesssstttt(((())))
  53.  
  54.           ilMpRequest(ilMpManager* parent,        _p_r_o_t_e_c_t_e_d
  55.                       ilMpState initialState=ilMpPrep)
  56.           ilMpRequest(ilMpRequest* sibling)       _p_r_o_t_e_c_t_e_d
  57.           ilMpRequest(ilMpState initialState=ilMpPrep) _p_r_o_t_e_c_t_e_d
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. iiiillllMMMMppppRRRReeeeqqqquuuueeeesssstttt((((3333))))     IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll     iiiillllMMMMppppRRRReeeeqqqquuuueeeesssstttt((((3333))))
  71.  
  72.  
  73.  
  74.           These constructors add dependent requests that must be processed
  75.           before the _p_a_r_e_n_t manager's work is considered completed.  The
  76.           initial state of the request is ilMpPrep by default but can be
  77.           ilMpCompute or ilMpGraphics also, if the request has no further
  78.           dependencies.
  79.  
  80.           The second form of the contructor gets its parent indirectly as the
  81.           parent of _s_i_b_l_i_n_g.  This form of the constructor is used when adding
  82.           requests after the manager has been started, since a sibling must
  83.           exist when this is called, there is no possibilty the parent manager
  84.           will disappear while making this call.  This form of the constructor
  85.           requires that the eeeennnnqqqquuuueeeeuuuueeee() method be called after constructor to
  86.           insert this request into the system.  It is delayed like this to
  87.           ensure that an ilMpRequest derived class if fully contructed before
  88.           it's pppprrrroooocccceeeessssssss() virtual is invoked.
  89.  
  90.           The third form is used for rare parentless requests (don't use
  91.           this).
  92.  
  93.      eeeennnnqqqquuuueeeeuuuueeee(((())))
  94.  
  95.           void enqueue(ilMpState initialState=ilMpPrep)     _p_r_o_t_e_c_t_e_d
  96.  
  97.  
  98.           This method is used to actually enqueue a request contructed with
  99.           sibling form of the ilMpRequest constructor.
  100.  
  101.      ggggeeeettttNNNNeeeexxxxttttSSSSttttaaaatttteeee(((())))
  102.  
  103.           ilMpState getNextState()
  104.  
  105.  
  106.           This method returns the next state for this request. See the
  107.           sssseeeettttNNNNeeeexxxxttttSSSSttttaaaatttteeee() method for more details.
  108.  
  109.      ggggeeeettttPPPPaaaarrrreeeennnntttt(((())))
  110.  
  111.           ilMpManager* getParent()
  112.  
  113.  
  114.           This is a specialized version of iiiillllMMMMppppNNNNooooddddeeee::::::::ggggeeeettttPPPPaaaarrrreeeennnntttt() that casts
  115.           the parent to an ilMpManager (since request's parents are always
  116.           managers.
  117.  
  118.      hhhhaaaassssSSSSiiiibbbblllliiiinnnnggggssss(((())))
  119.  
  120.           int hasSiblings()   _p_r_o_t_e_c_t_e_d
  121.  
  122.  
  123.           This method returns true of this request has siblings, this is an
  124.           inherently unsafe query (i.e. the result may no longer be correct by
  125.           the time it is examined).
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. iiiillllMMMMppppRRRReeeeqqqquuuueeeesssstttt((((3333))))     IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll     iiiillllMMMMppppRRRReeeeqqqquuuueeeesssstttt((((3333))))
  137.  
  138.  
  139.  
  140.      ppppaaaarrrrkkkk(((())))
  141.  
  142.           void park(ilMpRequest* reqToPark)
  143.  
  144.  
  145.           This method is used to defer processing of a request when it needs
  146.           to wait on the completion of this request (e.g. because this request
  147.           is already doing the same work but we don't want the parked
  148.           request's dependencies to be satisfied until this request
  149.           completes).
  150.  
  151.      pppprrrroooocccceeeessssssss(((())))
  152.  
  153.           virtual ilStatus process()    _p_r_o_t_e_c_t_e_d
  154.  
  155.  
  156.           The process virtual is defined by a derived class to do the actual
  157.           work of a request; typically the work will be broken down based an
  158.           the request state (e.g. prepare/compute/finish) using a switch
  159.           statement in the process() implementation.
  160.  
  161.      sssseeeettttNNNNeeeexxxxttttSSSSttttaaaatttteeee(((())))
  162.  
  163.           void setNextState(ilMpState next)
  164.  
  165.  
  166.           This method sets the next state for this request. The next state
  167.           info is used when a request phase completes and the request is ready
  168.           to transition to the next phase. This method can be used to override
  169.           the default transitions for a request.
  170.  
  171.      uuuunnnnppppaaaarrrrkkkk(((())))
  172.  
  173.           void unpark()  _p_r_o_t_e_c_t_e_d
  174.  
  175.  
  176.           This method unparks any requests that are currently in the park
  177.           list.  It assumes that no requests can ppppaaaarrrrkkkk() while unparking.
  178.  
  179. IIIINNNNHHHHEEEERRRRIIIITTTTEEEEDDDD MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNNSSSS
  180.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm iiiillllMMMMppppNNNNooooddddeeee
  181.      addProcessingTime(), clearStatus(), getDepth(), getParent(),
  182.      getProcessingTime(), getState(), getStatus(), getTimingWeight(),
  183.      inhibitAbort(), isAborting(), setStatus(), setTimingWeight()
  184.  
  185. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  186.      ilMpNode(3), ilMpManager(3)
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.